commonlibsse_ng\re\b/
BGSSoundCategory.rs

1use crate::re::FormTypes::FormType;
2use crate::re::TESForm::TESForm;
3use crate::re::TESFullName::TESFullName;
4use crate::re::offsets_rtti::RTTI_BGSSoundCategory;
5use crate::re::offsets_vtable::VTABLE_BGSSoundCategory;
6use crate::rel::id::VariantID;
7
8use super::BSISoundCategory::BSISoundCategory;
9
10#[repr(C)]
11#[derive(Debug)]
12pub struct BGSSoundCategory {
13    pub __base: TESForm,                       // 0x00
14    pub __base1: TESFullName,                  // 0x20
15    pub __base2: BSISoundCategory,             // 0x30
16    pub flags: BGSSoundCategoryFlag,           // 0x38
17    pub unk3C: u32,                            // 0x3C
18    pub parentCategory: *mut BGSSoundCategory, // 0x40
19    pub unk48: u16,                            // 0x48
20    pub attenuation: u16,                      // 0x4A
21    pub staticMult: u16,                       // 0x4C
22    pub defaultMenuValue: u16,                 // 0x4E
23    pub volumeMult: f32,                       // 0x50
24    pub frequencyMult: f32,                    // 0x54
25}
26const _: () = assert!(core::mem::size_of::<BGSSoundCategory>() == 0x58);
27
28impl BGSSoundCategory {
29    pub const RTTI: VariantID = RTTI_BGSSoundCategory;
30    pub const VTABLE: [VariantID; 3] = VTABLE_BGSSoundCategory;
31    pub const FORM_TYPE: FormType = FormType::SoundCategory;
32}
33
34#[commonlibsse_ng_derive_internal::ffi_enum]
35#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
36#[repr(u32)]
37pub enum BGSSoundCategoryFlag {
38    #[default]
39    None = 0,
40    MuteWhenSubmerged = 1 << 0,
41    ShouldAppearOnMenu = 1 << 1,
42}
43
44#[commonlibsse_ng_derive_internal::ffi_enum]
45#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
46pub enum RecordFlags {
47    Deleted = 1 << 5,
48    Ignored = 1 << 12,
49}